package org.marsdonne.audits;

import com.fasterxml.jackson.databind.JsonNode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * （业务执行的）记录/日志/便条/注记事件
 */
@Getter
@Setter
public class Noted implements Serializable {

    public enum Level {
        Warn, Info, Error
    }

    private String serviceId;//服务标识
    private String processId;//进程标识
    private Date dateRecorded;
    private Level level;
    private JsonNode message;

    public Noted(Level level, JsonNode message) {
        this.level = level;
        this.message = message;
        this.dateRecorded = new Date();
    }
}
